Skip to content

feat(update): add -c flag to update specific collections#335

Open
JasonOA888 wants to merge 1 commit intotobi:mainfrom
JasonOA888:feat/update-collection-filter
Open

feat(update): add -c flag to update specific collections#335
JasonOA888 wants to merge 1 commit intotobi:mainfrom
JasonOA888:feat/update-collection-filter

Conversation

@JasonOA888
Copy link

Problem

The -c/--collection flag works with search commands but not with qmd update. Users with many collections have to update all of them even when they only want to re-index specific ones.

Solution

Add collection filtering support to updateCollections() function:

qmd update -c notes              # Update only notes collection
qmd update -c notes -c docs      # Update multiple specific collections  
qmd update                       # Update all (existing behavior)

Changes

  • Add optional collectionFilter parameter to updateCollections()
  • Filter collections list when -c flag is provided
  • Show helpful message if no collections match the filter

Fixes #298

@jtsternberg
Copy link

What's the status here? This would be really handy. My https://github.com/jtsternberg/snippets-cli has first-class for qmd, but when you add a snippet (e.g. snip add --from-clipboard), it (currently) has to update ALL collections which takes some time.

The -c/--collection flag now works with 'qmd update' to filter
which collections to update. This is useful when you have many
collections and only want to re-index specific ones.

Usage:
  qmd update -c notes              # Update only 'notes' collection
  qmd update -c notes -c docs      # Update 'notes' and 'docs' collections
  qmd update                       # Update all collections (existing behavior)

Fixes tobi#298
@JasonOA888 JasonOA888 force-pushed the feat/update-collection-filter branch from 5dca271 to 50b334f Compare March 20, 2026 17:00
@JasonOA888
Copy link
Author

Thanks for the ping! I just rebased this PR onto the latest main. Should be ready for review now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update specific collection

2 participants